xen.git
18 years ago[IA64] Fix a perf counter typo
Alex Williamson [Tue, 22 Jan 2008 15:27:29 +0000 (08:27 -0700)]
[IA64] Fix a perf counter typo

Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
18 years ago[IA64] Introduce dom0_vhpt_size_log2 boot option to change dom0 vhpt size
Alex Williamson [Tue, 22 Jan 2008 15:26:20 +0000 (08:26 -0700)]
[IA64] Introduce dom0_vhpt_size_log2 boot option to change dom0 vhpt size

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
18 years ago[IA64] Fix thash long format crash
Alex Williamson [Fri, 18 Jan 2008 21:11:20 +0000 (14:11 -0700)]
[IA64] Fix thash long format crash

Do not overwrite r25 (and restore r24) for C fallback of vmx_asm_thash.

Signed-off-by: Tristan Gingold <tgingold@free.fr>
18 years ago[IA64] Fix emacs file mode in vmx_entry.S and vmx_vsa.S
Alex Williamson [Fri, 18 Jan 2008 21:09:04 +0000 (14:09 -0700)]
[IA64] Fix emacs file mode in vmx_entry.S and vmx_vsa.S

Not C, but ASM.  vmx_entry.S is cleary derived from linux entry.S
so that using 8tab makes sense.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
18 years ago[IA64] Use rcu where possible.
Alex Williamson [Fri, 18 Jan 2008 20:55:26 +0000 (13:55 -0700)]
[IA64] Use rcu where possible.

This is for consistency.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
18 years agomerge with xen-unstable.hg staging
Alex Williamson [Fri, 18 Jan 2008 20:49:48 +0000 (13:49 -0700)]
merge with xen-unstable.hg staging

18 years agominios: do not exit if FS backend not found.
Keir Fraser [Fri, 18 Jan 2008 16:20:47 +0000 (16:20 +0000)]
minios: do not exit if FS backend not found.
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
18 years agominios: support COW for a zero page
Keir Fraser [Fri, 18 Jan 2008 16:20:13 +0000 (16:20 +0000)]
minios: support COW for a zero page
Permits to support sparse data.
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
18 years agodo_set_trap_table()'s argument can be const.
Keir Fraser [Fri, 18 Jan 2008 16:09:05 +0000 (16:09 +0000)]
do_set_trap_table()'s argument can be const.

Also, automatically generate const version of every guest handle
definition.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agodo_callback_op()'s second argument can be const allowing the guest to
Keir Fraser [Fri, 18 Jan 2008 15:46:58 +0000 (15:46 +0000)]
do_callback_op()'s second argument can be const allowing the guest to
declare these (mostly static) argument structures 'const'.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
18 years agoMove primitive-type guest-handle definitions into common xen.h header file.
Keir Fraser [Fri, 18 Jan 2008 15:38:52 +0000 (15:38 +0000)]
Move primitive-type guest-handle definitions into common xen.h header file.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
18 years agopv-on-hvm: fix/adjust pv driver's mkbuildtree
Keir Fraser [Fri, 18 Jan 2008 15:28:59 +0000 (15:28 +0000)]
pv-on-hvm: fix/adjust pv driver's mkbuildtree

Allow invoking the script from other than the current directory (the
script now infers the tree is where the script lives). Print which
trees are actually being used.

Fix the linking of sources from Linux tree's drivers/xen/ - this was
needlessly invoking lndir on various sub-directories, in some cases
even twice.

Adjust the script to be able to deal with Linux 2.6.24's unified x86
include directory.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
18 years agoxenctx/x86: fix format for readability and add information
Keir Fraser [Fri, 18 Jan 2008 15:27:02 +0000 (15:27 +0000)]
xenctx/x86: fix format for readability and add information
Signed-off-by: Jan Beulich <jbeulich@novell.com>
18 years agominios: extend map_frames into being able to map a series of
Keir Fraser [Fri, 18 Jan 2008 15:22:42 +0000 (15:22 +0000)]
minios: extend map_frames into being able to map a series of
contiguous frames, or the same frame several times, aligned, from
another domain, with specific protection, and with potential
failures.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
18 years agominios: set text and rodata read-only, free unused pages 0 and 1
Keir Fraser [Fri, 18 Jan 2008 15:22:17 +0000 (15:22 +0000)]
minios: set text and rodata read-only, free unused pages 0 and 1
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
18 years agoClarify 'xm mem-set' and 'xm vcpu-set' requirements in documentation.
Keir Fraser [Fri, 18 Jan 2008 13:43:26 +0000 (13:43 +0000)]
Clarify 'xm mem-set' and 'xm vcpu-set' requirements in documentation.
From: Richard W.M. Jones <rjones@redhat.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agovt-d: Clean up and bug fixes to ioapic handling.
Keir Fraser [Fri, 18 Jan 2008 13:41:33 +0000 (13:41 +0000)]
vt-d: Clean up and bug fixes to ioapic handling.
Signed-off-by: Allen Kay <allen.m.kay@intel.com>
18 years agoRevert network-nat script changes introduced by 16739:33dcf04d77152.
Keir Fraser [Fri, 18 Jan 2008 13:40:22 +0000 (13:40 +0000)]
Revert network-nat script changes introduced by 16739:33dcf04d77152.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agoioemu: replace non-standard ulong with unsigned long
Keir Fraser [Fri, 18 Jan 2008 13:35:26 +0000 (13:35 +0000)]
ioemu: replace non-standard ulong with unsigned long

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
18 years agoqemu-dm: Nicely terminate the device model script, to let it properly
Keir Fraser [Fri, 18 Jan 2008 13:35:05 +0000 (13:35 +0000)]
qemu-dm: Nicely terminate the device model script, to let it properly
clean resources.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
18 years agoAdd FS backend/frontend drivers (frontend in minios only).
Keir Fraser [Fri, 18 Jan 2008 13:33:37 +0000 (13:33 +0000)]
Add FS backend/frontend drivers (frontend in minios only).

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Signed-off-by: Grzegorz Milos <gm281@cam.ac.uk>
18 years ago[IA64] Make maximum number of supported physical CPUs a compile-time option
Alex Williamson [Thu, 17 Jan 2008 19:17:14 +0000 (12:17 -0700)]
[IA64] Make maximum number of supported physical CPUs a compile-time option

Make maximum number of supported physical CPUs a compile-time
option via the 'max_phys_cpus=<nr>' compilation parameter.

Based on xen-unstable.hg cset 9464:d7cbcf5d7cd6

Signed-off-by: Atsushi SAKAI <sakaia@jp.fujitsu.com>
18 years ago[IA64] Support continuation for hypercall in hvm.
Alex Williamson [Thu, 17 Jan 2008 19:12:08 +0000 (12:12 -0700)]
[IA64] Support continuation for hypercall in hvm.

Signed-off-by: Tristan Gingold <tgingold@free.fr>
18 years ago[IA64] xenoprof/ia64 howto
Alex Williamson [Thu, 17 Jan 2008 19:11:01 +0000 (12:11 -0700)]
[IA64] xenoprof/ia64 howto

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
18 years ago[IA64] Cleanup duplicate kdump_find_rsvd_region()
Alex Williamson [Thu, 17 Jan 2008 19:05:44 +0000 (12:05 -0700)]
[IA64] Cleanup duplicate kdump_find_rsvd_region()

Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
18 years ago[IA64] Fix start_kernel() to call init_xenheap_pages() with correct range.
Alex Williamson [Thu, 17 Jan 2008 19:05:44 +0000 (12:05 -0700)]
[IA64] Fix start_kernel() to call init_xenheap_pages() with correct range.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
18 years ago[IA64] Improve boot loader data moving logic in start_kernel()
Alex Williamson [Thu, 17 Jan 2008 19:05:43 +0000 (12:05 -0700)]
[IA64] Improve boot loader data moving logic in start_kernel()

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
18 years ago[IA64] domheap: Clean up of context switch code
Alex Williamson [Thu, 17 Jan 2008 19:05:43 +0000 (12:05 -0700)]
[IA64] domheap: Clean up of context switch code

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
18 years ago[IA64] domheap: Introduce xenheap_megabytes boot option
Alex Williamson [Thu, 17 Jan 2008 19:05:43 +0000 (12:05 -0700)]
[IA64] domheap: Introduce xenheap_megabytes boot option

Now xenheap size isn't limited by DTR mapping. So we can set it larger size.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
18 years ago[IA64] domheap: Allocate mca related objects from domheap instead of xenheap
Alex Williamson [Thu, 17 Jan 2008 19:05:43 +0000 (12:05 -0700)]
[IA64] domheap: Allocate mca related objects from domheap instead of xenheap

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
18 years ago[IA64] domheap: Allocate percpu area from domheap
Alex Williamson [Thu, 17 Jan 2008 19:05:43 +0000 (12:05 -0700)]
[IA64] domheap: Allocate percpu area from domheap

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
18 years ago[IA64] domheap: Allocate vm buffer before boot allocator
Alex Williamson [Thu, 17 Jan 2008 19:05:43 +0000 (12:05 -0700)]
[IA64] domheap: Allocate vm buffer before boot allocator

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
18 years ago[IA64] domheap: Don't pin xenheap down. Now it's unnecessary.
Alex Williamson [Thu, 17 Jan 2008 19:05:43 +0000 (12:05 -0700)]
[IA64] domheap: Don't pin xenheap down. Now it's unnecessary.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
18 years ago[IA64] domheap: Fix current->domain->arch.shadow_bitmap reference
Alex Williamson [Thu, 17 Jan 2008 19:05:43 +0000 (12:05 -0700)]
[IA64] domheap: Fix current->domain->arch.shadow_bitmap reference

Don't reference current->domain->arch.shadow_bitmap in dirty_bit fault handler.
Instead copy it to arch_vcpu.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
18 years ago[IA64] domheap: Don't refer struct domain from GET_VA_VCPU_VHPT_MADDR()
Alex Williamson [Thu, 17 Jan 2008 19:05:43 +0000 (12:05 -0700)]
[IA64] domheap: Don't refer struct domain from GET_VA_VCPU_VHPT_MADDR()

So far, current->domain->arch.flags.has_pervcpu_vhpt is used.
Instead use current->arch.vhpt_page.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
18 years ago[IA64] domheap: Don't refer domain->arch.rid_bits from optfaults.S
Alex Williamson [Thu, 17 Jan 2008 19:05:43 +0000 (12:05 -0700)]
[IA64] domheap: Don't refer domain->arch.rid_bits from optfaults.S

Copy it to struct arch_vcpu.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
18 years ago[IA64] domheap: Allocate privregs from domain heap for VTi domain
Alex Williamson [Thu, 17 Jan 2008 19:05:43 +0000 (12:05 -0700)]
[IA64] domheap: Allocate privregs from domain heap for VTi domain

- Pin privregs down with both dtr/itr so that privregs can be allocated
  from the domain heap
- Introduce vmx_vpd_pin()/vmx_vpd_unpin().
  The vpd area is pinned down when current.  But two functions,
  update_vhpi() and alloc_vpd() are exceptions.
  We have to pin down the area before PAL call.
- Minor twist context switch not to use unpinned vpd area.
  vmx_load_state() needs the vpd area pinned down.
  Call it after vmx_load_all_rr()
- Fix vmx_load_all_rr()
  vmx_switch_rr7() sets psr.ic = 0 so that clearing psr.ic before calling
  vmx_switch_rr7() doesn't make sense.
- Improve vmx_switch_rr7()
  It sets psr.ic = 0 after switching to physical mode. But it can be
  done at the switching time.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
18 years ago[IA64] domheap: Remove duplicated declarations vmx_save_state()/vmx_load_state()
Alex Williamson [Thu, 17 Jan 2008 19:05:43 +0000 (12:05 -0700)]
[IA64] domheap: Remove duplicated declarations vmx_save_state()/vmx_load_state()

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
18 years ago[IA64] domheap: Remove the unused constant, IA64_DOMAIN_SHARED_INFO_VA_OFFSET
Alex Williamson [Thu, 17 Jan 2008 19:05:43 +0000 (12:05 -0700)]
[IA64] domheap: Remove the unused constant, IA64_DOMAIN_SHARED_INFO_VA_OFFSET

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
18 years ago[IA64] domheap: Allocate PV privregs pages from domain heap
Alex Williamson [Thu, 17 Jan 2008 19:05:43 +0000 (12:05 -0700)]
[IA64] domheap: Allocate PV privregs pages from domain heap

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
18 years ago[IA64] domheap: Allocate shared_info page from domain heap
Alex Williamson [Thu, 17 Jan 2008 19:05:43 +0000 (12:05 -0700)]
[IA64] domheap: Allocate shared_info page from domain heap

Hyperprivops were accessing shared_info page with psr.ic = 0.
They are accessing the page via current_psr_i_addr.
We can set it to shared_info_va which is mapped by IA64_TR_SHARED_INFO.
Thus we can allocate the page form domain heap

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
18 years ago[IA64] domheap: Remove unused IA64_DOMAIN_SHARED_INFO_OFFSET
Alex Williamson [Thu, 17 Jan 2008 19:05:43 +0000 (12:05 -0700)]
[IA64] domheap: Remove unused IA64_DOMAIN_SHARED_INFO_OFFSET

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
18 years ago[IA64] domheap: Fix ia64_switch_to()
Alex Williamson [Thu, 17 Jan 2008 19:05:43 +0000 (12:05 -0700)]
[IA64] domheap: Fix ia64_switch_to()

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
18 years ago[IA64] Fix MCA handling from xen relocation changes
Alex Williamson [Thu, 17 Jan 2008 19:05:43 +0000 (12:05 -0700)]
[IA64] Fix MCA handling from xen relocation changes

Signed-off-by: Kazuhiro Suzuki <kaz@jp.fujitsu.com>
18 years ago[IA64] Rearrange IA64_TR_ definitions to use from lower value
Alex Williamson [Thu, 17 Jan 2008 19:05:43 +0000 (12:05 -0700)]
[IA64] Rearrange IA64_TR_ definitions to use from lower value

SDM vol2 4.1.1.1 says that:
 "software should allocate contiguous translation registers starting
  at slot 0 and continuing upwards."

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
18 years ago[IA64] Allocate struct vcpu from domheap.
Alex Williamson [Thu, 17 Jan 2008 19:05:43 +0000 (12:05 -0700)]
[IA64] Allocate struct vcpu from domheap.

Now there's no constraint to allocate struct vcpu from xenheap.
So allocate it from domain heap.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
18 years ago[IA64] Fix ia64_reload_tr in mca_asm.S
Alex Williamson [Thu, 17 Jan 2008 19:05:43 +0000 (12:05 -0700)]
[IA64] Fix ia64_reload_tr in mca_asm.S

- DTR for stack comparison should be done with xen heap.
- cpu_kr current offset contains (physicall address >> IA64_GRANULE_SHIFT)
  so the comparison was done with the wrong value.
- When mapping VHPT area, overlapping should be avoided.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
18 years ago[IA64] Remove init_task definition
Alex Williamson [Thu, 17 Jan 2008 19:05:43 +0000 (12:05 -0700)]
[IA64] Remove init_task definition

init_task in kernel area shouldn't be referenced.
The corresponding address in the identity mapping area should be used.
i.e. ia64_tpa(init_task) + PAGE_OFFSET, because ia64_switch_rr7() and
vmx_switch_rr7() assume that stack is in indentity mapping area.
To make it sure, remove init_task definition.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
18 years ago[IA64] Fix start in head.S
Alex Williamson [Thu, 17 Jan 2008 19:05:43 +0000 (12:05 -0700)]
[IA64] Fix start in head.S

Later stack was allocated from domain heap, so that stack should be
mapped if necessary.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
18 years ago[IA64] Fix ia64_switch_to() so that it checks overlap with xenheap.
Alex Williamson [Thu, 17 Jan 2008 19:05:43 +0000 (12:05 -0700)]
[IA64] Fix ia64_switch_to() so that it checks overlap with xenheap.

- Remove unncessary movl if possible
- Fix overlapping check
- re-add #ifdef XEN.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
18 years ago[IA64] Fix ia64_swith_to() so that it doesn't check with init_task
Alex Williamson [Thu, 17 Jan 2008 19:05:43 +0000 (12:05 -0700)]
[IA64] Fix ia64_swith_to() so that it doesn't check with init_task

init_task isn't used directly so that comparison with init_task in
ia64_switch_to() is pointless. Remove the comparison.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
18 years ago[IA64] Cleanup white space in ia64_switch_to()
Alex Williamson [Thu, 17 Jan 2008 19:05:43 +0000 (12:05 -0700)]
[IA64] Cleanup white space in ia64_switch_to()

Use tab instead of 4 space.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
18 years ago[IA64] Make vmx_swtich_rr7() consistent to ia64_new_rr7() so that it maps stack.
Alex Williamson [Thu, 17 Jan 2008 19:05:43 +0000 (12:05 -0700)]
[IA64] Make vmx_swtich_rr7() consistent to ia64_new_rr7() so that it maps stack.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
18 years ago[IA64] Cleanup white space of vmx_switch_rr7. use tab.
Alex Williamson [Thu, 17 Jan 2008 19:05:43 +0000 (12:05 -0700)]
[IA64] Cleanup white space of vmx_switch_rr7. use tab.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
18 years ago[IA64] Update a stale comment in xenasm.S
Alex Williamson [Thu, 17 Jan 2008 19:05:43 +0000 (12:05 -0700)]
[IA64] Update a stale comment in xenasm.S

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
18 years agominios: add blkfront
Keir Fraser [Thu, 17 Jan 2008 16:41:46 +0000 (16:41 +0000)]
minios: add blkfront

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
18 years agohvm: Extboot support for Xen
Keir Fraser [Thu, 17 Jan 2008 16:39:14 +0000 (16:39 +0000)]
hvm: Extboot support for Xen

This patch adds extboot to Xen.  It should be pretty harmless as the
moment because it's never enabled.  extboot allows arbitrary block
devices to be used to boot guests including SCSI and PV disks.  I've
tested it with both Windows and Linux guests in QEMU.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
18 years agominios: support several netfronts
Keir Fraser [Thu, 17 Jan 2008 15:50:48 +0000 (15:50 +0000)]
minios: support several netfronts

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
18 years agoxm: Fix xm restore command.
Keir Fraser [Thu, 17 Jan 2008 15:23:47 +0000 (15:23 +0000)]
xm: Fix xm restore command.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
18 years agoMinor correction in xm man page for 'xm create'.
Keir Fraser [Thu, 17 Jan 2008 15:21:35 +0000 (15:21 +0000)]
Minor correction in xm man page for 'xm create'.
From: Richard W.M. Jones <rjones@redhat.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agominios: add xenbus token support and separate watch event queues
Keir Fraser [Thu, 17 Jan 2008 15:20:02 +0000 (15:20 +0000)]
minios: add xenbus token support and separate watch event queues

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
18 years agotools: disable lomount and miniterm by default
Keir Fraser [Thu, 17 Jan 2008 15:18:38 +0000 (15:18 +0000)]
tools: disable lomount and miniterm by default

lomount is a tool which reads and parses a partition table in a disk
image block device and then uses mount -o ...offset=... to mount it.
This is not an ideal approach.  For example, if the intended
filesystem has corrupted metadata the kernel's filesystem driver may
start to write outside of the intended region.  This might even be
exploitable in some perverse circumstances.

Nowadays people wanting to do this should use kpartx, which uses
devmapper to create appropriate range mappings.  So lomount should be
disabled.

miniterm may well be useful but it is a clone-and-hack of an upstream
project and is currently built but not installed by default, partly
because it doesn't make sense to install on the dom0 which it might be
trying to debug.

It is probably useful to retain these two programs in the source tree
but IMO they should no longer be built by default.

The attached patch does these things:
 * CONFIG_LOMOUNT and CONFIG_MINITERM in Config.mk
   can enable and disable these programs
 * They are disabled by default
 * If CONFIG_MINITERM=y it is still built but not installed.
   make -C tools/misc/miniterm install  will install it.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
18 years agotools: LDFLAGS in link lines
Keir Fraser [Thu, 17 Jan 2008 15:17:22 +0000 (15:17 +0000)]
tools: LDFLAGS in link lines

LDFLAGS is not honoured by a couple of link lines in tools/*, but
should be.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
18 years agonetwork scripts: SUSE has sensible use of ifup nowadays
Keir Fraser [Thu, 17 Jan 2008 15:14:17 +0000 (15:14 +0000)]
network scripts: SUSE has sensible use of ifup nowadays

While wading through the patches made to Xen by OpenSUSE in their
[s]rpm, I found that they have removed various special casing for ifup
on ther distribution.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
18 years agotools/docs: Fix example and default IP addresses.
Keir Fraser [Thu, 17 Jan 2008 15:13:40 +0000 (15:13 +0000)]
tools/docs: Fix example and default IP addresses.

In various places in documentation and code, IP addresses are provided
as examples, defaults, or dummy configuration.  In general the
specific IP addresses used in Xen are not always appropriate.  (For
example, 1.2.3.4 is used in a few places!)

The following addresses should be used:
 * For examples and documentation, 192.0.2.0/24.  (See RFC3330.)
 * For defaults for private networks, a random network from RFC1918.
   I have randomly selected 172.30.206.0/24 for this purpose and
   documented this in at the only registry I know of,
   www.ucam.org/cam-grin.  This network should henceforth be used for
   default configurations of local bridges, test networks, etc. in
   Xen tools.

The following addresses should NOT be used:
 * 10.0.*.*, 10.1.*.*, 192.168.0.*, 192.168.1.*, etc.  Using these
   addresses gives greatly increased likelihood of collision, as
   ignorant network administrators and reckless middlebox vendors
   often pick networks from the bottom of 10/8 and 192.168/16.
 * 169.254.*.*.  These are reserved for zeroconf (ad-hoc networking)
   and should not be used for Xen private networks, bridges, etc.,
   etc.  Use of these addresses by Xen scripts causes trouble on hosts
   (eg laptops) which find themselves in ad-hoc networking
   environments.  I think this is not hypothetical (!) since at least
   one Linux distribution have specific code to detect this case and
   cause Xen startup to fail iff the host already has an external
   zeroconf address.
 * 1.2.3.4.  WTF !?

I have also used 127.0.255.255 in one place where apparently a dummy
address is needed (some Linux kernels won't accept a lack of an NFS
server address).  If 127.0.255.255 is mistakenly used it is unlikely
to do any damage to real traffic even if it does escape into the
network at large.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
18 years agolibxen: Avoid declarations-after-statement (C++ coding style).
Keir Fraser [Thu, 17 Jan 2008 15:11:22 +0000 (15:11 +0000)]
libxen: Avoid declarations-after-statement (C++ coding style).
Signed-off-by: Andre Przywara <andre.przywara@amd.com>
libxen: Use build-system CFLAGS and LDFLAGS.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agominios: add realloc
Keir Fraser [Thu, 17 Jan 2008 15:06:30 +0000 (15:06 +0000)]
minios: add realloc

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Signed-off-by: Tim Deegan <tim.deegan@eu.citrix.com>
18 years agominios: make stack size configurable
Keir Fraser [Thu, 17 Jan 2008 14:41:44 +0000 (14:41 +0000)]
minios: make stack size configurable

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Signed-off-by: Grzegorz Milos <gm281@cam.ac.uk>
18 years agominios: add wait_event_deadline
Keir Fraser [Thu, 17 Jan 2008 14:41:12 +0000 (14:41 +0000)]
minios: add wait_event_deadline

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Signed-off-by: Tim Deegan <tim.deegan@eu.citrix.com>
18 years agominios: add trydown
Keir Fraser [Thu, 17 Jan 2008 14:40:55 +0000 (14:40 +0000)]
minios: add trydown

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
18 years agominios: use ASSERT for BUG_ON
Keir Fraser [Thu, 17 Jan 2008 14:40:23 +0000 (14:40 +0000)]
minios: use ASSERT for BUG_ON

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
18 years agominios: Add exit_thread prototype. Make sure exit_thread doesn't
Keir Fraser [Thu, 17 Jan 2008 14:40:06 +0000 (14:40 +0000)]
minios: Add exit_thread prototype. Make sure exit_thread doesn't
return by accident.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
18 years agominios: Add noreturn attribute to do_exit
Keir Fraser [Thu, 17 Jan 2008 14:39:45 +0000 (14:39 +0000)]
minios: Add noreturn attribute to do_exit

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
18 years agominios: Optimize IA64's get_current()
Keir Fraser [Thu, 17 Jan 2008 14:39:21 +0000 (14:39 +0000)]
minios: Optimize IA64's get_current()

Let gcc access r13 itself, leading to better code

Signed-off-by: Samuel Thibault <samuel.thibault@citrix.com>
18 years agoUpdate API changelog for new feature flags.
Keir Fraser [Thu, 17 Jan 2008 13:03:22 +0000 (13:03 +0000)]
Update API changelog for new feature flags.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agohvm: Allocate an unmapped guard page to separate ordinary low RAM
Keir Fraser [Thu, 17 Jan 2008 12:59:10 +0000 (12:59 +0000)]
hvm: Allocate an unmapped guard page to separate ordinary low RAM
from special pages (ioreq, xenstore, etc). This will stop some probe
functions (e.g., embedded in memtest) from stomping on the special
pages.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agoamd hvm (svm): Print warning if NPT constraints on PAE are hit.
Keir Fraser [Wed, 16 Jan 2008 15:55:57 +0000 (15:55 +0000)]
amd hvm (svm): Print warning if NPT constraints on PAE are hit.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agoxenconsoled: Make slave pty raw during initialization.
Keir Fraser [Wed, 16 Jan 2008 13:44:18 +0000 (13:44 +0000)]
xenconsoled: Make slave pty raw during initialization.
(This avoids echo).

Signed-off-by: Tristan Gingold <tgingold@free.fr>
18 years agox86: New feature flag XENFEAT_mmu_pt_update_preserve_ad.
Keir Fraser [Wed, 16 Jan 2008 13:27:59 +0000 (13:27 +0000)]
x86: New feature flag XENFEAT_mmu_pt_update_preserve_ad.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agox86: Reserve a CPUID feature bit to advertise new
Keir Fraser [Wed, 16 Jan 2008 11:44:41 +0000 (11:44 +0000)]
x86: Reserve a CPUID feature bit to advertise new
MMU_PT_UPDATE_PRESERVE_AD hypercall command.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agox86: Document the new MMU_PT_UPDATE_PRESERVE_AD hypercall.
Keir Fraser [Tue, 15 Jan 2008 21:23:37 +0000 (21:23 +0000)]
x86: Document the new MMU_PT_UPDATE_PRESERVE_AD hypercall.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years ago-DNDEBUG for hypervisor only
Keir Fraser [Tue, 15 Jan 2008 18:50:44 +0000 (18:50 +0000)]
-DNDEBUG for hypervisor only
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
18 years agolibxen: Fix function prototype.
Keir Fraser [Tue, 15 Jan 2008 18:48:32 +0000 (18:48 +0000)]
libxen: Fix function prototype.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
18 years agoMerge with ia64 tree.
Keir Fraser [Tue, 15 Jan 2008 14:39:23 +0000 (14:39 +0000)]
Merge with ia64 tree.

18 years agox86: Allow batched mmu updates which preserve accessed/dirty pte bits.
Keir Fraser [Tue, 15 Jan 2008 14:32:15 +0000 (14:32 +0000)]
x86: Allow batched mmu updates which preserve accessed/dirty pte bits.
Signed-off-by: Bruce Rogers <brogers@novell.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agoUpdate version to 3.3-unstable.
Keir Fraser [Tue, 15 Jan 2008 14:27:15 +0000 (14:27 +0000)]
Update version to 3.3-unstable.

18 years agoxend: Remove hardcoded (and apparently unused) xend version.
Keir Fraser [Tue, 15 Jan 2008 14:24:05 +0000 (14:24 +0000)]
xend: Remove hardcoded (and apparently unused) xend version.
Signed-off-by: Jim Fehlig <jfehlig@novell.com>
18 years agohvm, x86: Add QEMU BIOS menu for choosing boot device.
Keir Fraser [Tue, 15 Jan 2008 14:22:50 +0000 (14:22 +0000)]
hvm, x86: Add QEMU BIOS menu for choosing boot device.

The attached patch implements a mini BIOS menu for choosing a
non-default
boot device. When a guest starts it'll display

   'Press F10 to select boot device'

And wait 3 seconds, before continuing with the normal boot device. If
they press the F10 key, a menu is shown allowing a choice between
floppy, harddisk, cdrom and network (PXE).

I can't take credit for this originally - Jeremy Katz wrote it for
KVM, I merely re-diffed the patch to work against Xen's QEMU/BIOS code
tree. It has been tested in Fedora successfully against 3.1.x and 3.2.x

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
CC: Jeremy Katz <katzj@redhat.com>
If more than one boot device has been selected, the currently selected
number displayed in the menu is wrong.

Signed-off-by: Stefano Stabellini <stefano.stabellini@citrix.com>
18 years agoblktap: factor out linux specific code
Keir Fraser [Tue, 15 Jan 2008 14:17:22 +0000 (14:17 +0000)]
blktap: factor out linux specific code
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
18 years ago[IA64] Fix security vulnerability
Alex Williamson [Tue, 15 Jan 2008 14:07:01 +0000 (07:07 -0700)]
[IA64] Fix security vulnerability

DomU can map any other domain's memory.

Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
18 years agox86: INT3 and INTO trap gates should have DPL==3.
Keir Fraser [Tue, 15 Jan 2008 11:29:15 +0000 (11:29 +0000)]
x86: INT3 and INTO trap gates should have DPL==3.
This was broken by c/s 16667 (gdbstub changes).
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agoAdded tag 3.2.0-rc6 for changeset 9facc624a238
Keir Fraser [Sun, 13 Jan 2008 10:50:18 +0000 (10:50 +0000)]
Added tag 3.2.0-rc6 for changeset 9facc624a238

18 years agoUpdate version to xen-3.2.0-rc6
Keir Fraser [Sun, 13 Jan 2008 10:50:13 +0000 (10:50 +0000)]
Update version to xen-3.2.0-rc6

18 years agox86: Fix PV PIT handler after previous changeset.
Keir Fraser [Sat, 12 Jan 2008 11:26:04 +0000 (11:26 +0000)]
x86: Fix PV PIT handler after previous changeset.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agohvm: Improve in-Xen PIO emulation to better handle string PIO
Keir Fraser [Sat, 12 Jan 2008 11:13:57 +0000 (11:13 +0000)]
hvm: Improve in-Xen PIO emulation to better handle string PIO
instructions.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agosvm: Properly mask unsupported bits in CPUID_80000001_ECX.
Keir Fraser [Sat, 12 Jan 2008 09:29:38 +0000 (09:29 +0000)]
svm: Properly mask unsupported bits in CPUID_80000001_ECX.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agohvm: hpet: Tidy up hpet_to_ns_limit calculation.
Keir Fraser [Fri, 11 Jan 2008 11:01:36 +0000 (11:01 +0000)]
hvm: hpet: Tidy up hpet_to_ns_limit calculation.
Suggested by Haitao Shan @ Intel.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agovmxassist: Emulate CLTS.
Keir Fraser [Fri, 11 Jan 2008 10:59:48 +0000 (10:59 +0000)]
vmxassist: Emulate CLTS.
Signed-off-by: Kamala Narasimhan <kamala.narasimhan@citrix.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agox86 hvm: hvm_maybe_deassert_evtchn_irq() needs to be called early in
Keir Fraser [Fri, 11 Jan 2008 10:53:44 +0000 (10:53 +0000)]
x86 hvm: hvm_maybe_deassert_evtchn_irq() needs to be called early in
vmexit handling, before IO-APIC can be EOIed or unmasked and resample
the fake INTx line.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
18 years agox86_emulate: Fix near CALL/JMP <reg,mem>. Broken by c/s 16491.
Keir Fraser [Thu, 10 Jan 2008 22:53:43 +0000 (22:53 +0000)]
x86_emulate: Fix near CALL/JMP <reg,mem>. Broken by c/s 16491.
Thanks to AMD for narrowing this one down.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>